<script setup>
import { ref } from 'vue'
import CustomTabbar from './components/custom-tabbar/custom-tabbar.vue'
import HomeContent from './components/HomeContent/HomeContent.vue'

const tabIndex = ref(0)

const onTabChange = (index) => {
  tabIndex.value = index
  console.log('当前选中tab:', index)
}
</script>

<template>
	<view class="container">
		<HomeContent />
		<CustomTabbar :current="tabIndex" @change="onTabChange" />
	</view>
    
</template>

<style scoped lang="scss">
	.container{
		height: 100vh;
		background: linear-gradient(#C8E6C9, #fff);
	}
</style>